﻿#include "stdafx.h"
#include "PhysTriggerReport.h"

_NAMESPACE_BEGIN

void TriggerReport::onTrigger(NxShape& triggerShape, NxShape& otherShape, NxShapeFlag status)
{
	TriggerInfor infor;
	infor.triggerShape = &triggerShape;
	infor.otherShape   = &otherShape;

	if(status & NX_TRIGGER_ON_ENTER)
	{	
		infor.status = TRIGGER_ENTER;
	}
	if(status & NX_TRIGGER_ON_LEAVE)
	{
		infor.status = TRIGGER_LEAVE;
	}
	event(infor);
}

_NAMESPACE_END